/**
 * Painel para Arvore de Elementos do Layout
 *
 * @this {UIElementsPanel}
 * @version
 */

function UIElementsPanel() {

    /**
     * Variaveis
     */
    var _oPanel = null;
    var _oUITreeView = null;
    
    /**
     * Inicializa o objeto da classe
     */
    this.init = function() {

        _oPanel = new YAHOO.widget.Panel("elementspanel", {
            width: '200px',
            height: '250px',
            xy: [1050,70],
            close: false,
            underlay: "shadow",
            scroll: true,
            autofillheight: "body",
            constraintoviewport:true,
            draggable: true
        } );
        _oPanel.render();
        _oPanel.show();


        var resizeElementsPanel = new YAHOO.util.Resize('elementspanel', {
            handles: ['br'],
            autoRatio: false,
            status: false,
            animate: false
        });

        resizeElementsPanel.on("resize", function(args) {
            var panelHeight = args.height;
            this.cfg.setProperty("height", panelHeight + "px");
        }, _oPanel, true);

    }

    /**
     * Funcoes
     */
    this.loadBody = function() {
        _oUITreeView = new UITreeView();
    }

    this.getUITreeView = function() {
        return _oUITreeView;
    }

    /**
     * Chamada do inicializador da classe
     */
    this.init();
}

